package com.szh.publisher.config;

import org.springframework.amqp.support.converter.Jackson2JsonMessageConverter;
import org.springframework.amqp.support.converter.MessageConverter;

/**
 * 功能：存储到队列里的消息以json格式
 * 默认是：java序列化
 * RabbitTemplate 类中 定义类变量： 	private MessageConverter messageConverter = new SimpleMessageConverter();
 *
 *
 * @author root*/
// @Configuration
public class MyRabbitConfig {
    // @Bean
    public MessageConverter messageConverter(){
        return new Jackson2JsonMessageConverter();
    }
}